LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

LOCAL_MODULE    := tre 
### Add all source file names to be included in lib separated by a whitespace
LOCAL_SRC_FILES := tre_wrapper.c 

WORKSPACES_PATH := /Users/mso/Documents/workspaces

LIBUTF8_ANDROID_PATH := $(WORKSPACES_PATH)/extandlibs//libutf8/libutf8-android
MY_LIBUTF8_INCLUDES := $(LIBUTF8_ANDROID_PATH)/include
MY_LIBUTF8_LIB := $(LIBUTF8_ANDROID_PATH)/lib/libutf8.a
MY_LIBUTF8_LINKOPTION := -L$(LIBUTF8_ANDROID_PATH)/lib -lutf8

LIBTRE_ANDROID_PATH := $(WORKSPACES_PATH)/extandlibs/libtre/tre-android
MY_LIBTRE_INCLUDES :=  $(LIBTRE_ANDROID_PATH)/include
MY_LIBTRE_LIB := $(LIBTRE_ANDROID_PATH)/lib/libtre.a
MY_LIBTRE_LINKOPTION := -L$(LIBTRE_ANDROID_PATH)/lib -ltre

LOCAL_C_INCLUDES := $(MY_LIBUTF8_INCLUDES) $(MY_LIBTRE_INCLUDES)
LOCAL_CFLAGS += -Wall -Werror

# LOCAL_STATIC_LIBRARIES += $(MY_LIBTRE_LIB) $(MY_LIBUTF8_LIB)
# TARGET_PREBUILT_STATIC_LIBRARIES += $(MY_LIBTRE_LIB) $(MY_LIBUTF8_LIB)
# LOCAL_LDLIBS := -llog -ldl
LOCAL_LDLIBS := $(MY_LIBTRE_LINKOPTION) $(MY_LIBUTF8_LINKOPTION) -llog -ldl

include $(BUILD_SHARED_LIBRARY)
